package grape.attend.rest.user.form;
import grape.common.rest.form.BaseUpdateForm;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 用户请/补假单表
 * </p>
 *
 * @author yangwei
 * @since 2020-05-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="用户请/补假单更新表单对象")
public class UserLeaveApplicationUpdateForm extends BaseUpdateForm {

    private static final long serialVersionUID = 1L;

    @NotNull(message="请假明细不能为空")
    @Valid
    @ApiModelProperty(value = "请假明细",required = true)
    List<UserLeaveCreateForm> userLeaves;

    @NotNull(message="请/补假不能为空")
    @ApiModelProperty(value = "是否请假，否则补假",required = true)
    private Boolean isAskForLeave;

    @NotEmpty(message="原因、理由不能为空")
    @ApiModelProperty(value = "原因、理由",required = true)
    private String reason;

    @NotNull(message="是否提交审批不能为空")
    @ApiModelProperty(value = "是否提交审批",required = true)
    private Boolean isSubmitApprove;

    @ApiModelProperty(value = "备注")
    private String remark;

}
